<?php

class Video_Table_Model_Video extends Database_Model_Item
{
	protected $_pk = 'video_id';

	protected $_itemType = 'video';

	function getTitle()
	{
		return $this -> title;
	}

	function getUrl()
	{
		return Nuo::getUrl('video/view', array('video_id' => $this -> getId()));
	}

	function getEmbedCode($params = NULL)
	{
		$plugin = Nuo::getApi('video') -> getPlugin($this -> plugin);

		if (!$plugin)
		{
			return '';
		}

		return $plugin -> getEmbedCode($this, $params);
	}

}
